/* ========================================
   Project Page Specific Styles
   ======================================== */

/* Project Hero */
.project-hero {
    padding: 8rem 0 4rem;
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    transition: var(--transition-fast);
}

.back-link svg {
    width: 18px;
    height: 18px;
    transition: var(--transition-fast);
}

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

.back-link:hover svg {
    transform: translateX(-5px);
}

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

.project-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.project-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.project-hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.project-hero-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.project-hero-tech span {
    padding: 0.45rem 1rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.project-hero-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tabs */
.project-tabs-section {
    position: sticky;
    top: 70px;
    z-index: 100;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
}

.tabs-wrapper {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.tab-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--bg-primary);
}

.tab-icon {
    font-size: 1rem;
}

/* Tab Content */
.project-main {
    padding: 3rem 0 var(--section-padding);
    position: relative;
    z-index: 1;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Content Sections */
.content-section {
    margin-bottom: 4rem;
}

.content-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.content-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
}

.content-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}

.lead-text {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.content-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Highlight Card */
.highlight-card {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.highlight-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.highlight-card h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.highlight-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.feature-card {
    padding: 1.75rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-medium);
}

.feature-card:hover {
    border-color: rgba(34, 211, 238, 0.2);
    transform: translateY(-3px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.code-snippet {
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow-x: auto;
}

.code-snippet code {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--accent-primary);
}

/* Architecture Diagram */
.architecture-diagram {
    padding: 2.5rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
}

.arch-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: max-content;
}

.arch-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.25rem;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 12px;
    min-width: 100px;
}

.arch-icon {
    font-size: 1.4rem;
}

.arch-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-primary);
}

.arch-arrow {
    color: var(--accent-primary);
    font-size: 1.25rem;
}

/* Contribution */
.contribution-highlight {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    border-left: 4px solid var(--accent-primary);
}

.contribution-header {
    margin-bottom: 1rem;
}

.contribution-role {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.contribution-highlight p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.contribution-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
}

.contribution-list li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contribution-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.team-member {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: var(--transition-medium);
    overflow: visible;
}

.team-member:hover {
    border-color: rgba(168, 85, 247, 0.3);
    z-index: 10;
    position: relative;
}

.team-member.highlight-member {
    border-color: rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.05);
}

.member-avatar {
    width: 55px;
    height: 55px;
    margin: 0 auto 1rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--bg-primary);
}

.team-member h4.member-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.3s;
}

.team-member:hover h4.member-name {
    color: var(--accent-primary);
}

.member-role {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.member-desc-wrapper {
    position: relative;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease, padding-bottom 0.4s ease;
    margin-top: 0;
    padding-bottom: 0;
}

.team-member:hover .member-desc-wrapper {
    max-height: 500px;
    margin-top: 0.75rem;
    padding-bottom: 0.5rem;
}

.member-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    opacity: 0;
    transition: opacity 0.4s ease 0.1s;
    padding: 0;
    margin: 0;
}

.team-member:hover .member-desc {
    opacity: 1;
}

/* Reflection */
.reflection-content {
    max-width: 800px;
}

.reflection-quote {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--text-primary);
    padding: 2rem;
    background: var(--bg-card);
    border-left: 4px solid var(--accent-primary);
    border-radius: 0 16px 16px 0;
    margin-bottom: 3rem;
    line-height: 1.5;
}

.reflection-block {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.reflection-block h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.reflection-block p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.reflection-block p:last-child {
    margin-bottom: 0;
}

/* Skills */
.skills-category {
    margin-bottom: 3rem;
}

.skills-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skills-icon {
    font-size: 1.5rem;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.skill-item {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.skill-name {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
}

.skill-level {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
}

.skill-level.advanced {
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-primary);
}

.skill-level.intermediate {
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent-secondary);
}

.skill-level.foundational {
    background: rgba(244, 114, 182, 0.1);
    color: var(--accent-tertiary);
}

.skill-level.strong {
    background: rgba(74, 222, 128, 0.1);
    color: var(--accent-success);
}

.skill-level.improved {
    background: rgba(251, 191, 36, 0.1);
    color: var(--accent-warning);
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 1s ease;
}

.skill-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: var(--transition-medium);
}

.timeline-item.visible,
.timeline-item {
    opacity: 1;
    transform: translateX(0);
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    z-index: 1;
}

.timeline-content {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Accordion */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.accordion-header svg {
    width: 20px;
    height: 20px;
    transition: var(--transition-fast);
}

.accordion-item.active .accordion-header svg {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 600px;
}

.code-block {
    margin: 0;
    padding: 1.5rem;
    background: #0d1117;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-block .keyword { color: #ff79c6; }
.code-block .function { color: #50fa7b; }
.code-block .string { color: #f1fa8c; }
.code-block .comment { color: #6272a4; }
.code-block .number { color: #bd93f9; }
.code-block .builtin { color: #8be9fd; }

/* Upcoming Placeholder */
.upcoming-placeholder {
    text-align: center;
    padding: 5rem 2rem;
}

.upcoming-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    opacity: 0.6;
}

.upcoming-placeholder h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.upcoming-placeholder p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

.placeholder-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.placeholder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 130px;
}

.placeholder-icon {
    font-size: 1.5rem;
}

.placeholder-item span:last-child {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .project-hero-stats {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .project-hero {
        padding: 7rem 0 3rem;
    }
    
    .project-tabs-section {
        top: 60px;
    }
    
    .tabs-wrapper {
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .arch-flow {
        flex-direction: column;
    }
    
    .arch-arrow {
        transform: rotate(90deg);
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline {
        padding-left: 2.5rem;
    }
    
    .timeline-marker {
        left: -2.5rem;
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .placeholder-features {
        gap: 1rem;
    }
    
    .placeholder-item {
        min-width: 110px;
        padding: 1rem;
    }
}

/* ========================================
   Lightbox Modal
   ======================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-content p {
    margin-top: 1.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    text-align: center;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

/* Image wrapper hover effects */
.image-wrapper:hover .gallery-image {
    transform: scale(1.05);
}

.image-wrapper:hover .zoom-overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    .project-hero {
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .project-hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .project-hero-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .project-hero-download {
        margin-top: 1.5rem;
    }
    
    .project-hero-download .btn {
        width: 100%;
        justify-content: center;
    }
    
    .tabs-wrapper {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem 0;
    }
    
    .tab-btn {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
        flex: 1 1 calc(50% - 0.25rem);
        min-width: auto;
    }
    
    .tab-icon {
        font-size: 1rem;
    }
    
    .content-section {
        padding: 1.5rem 0;
    }
    
    .content-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-item {
        width: 100%;
    }
    
    .image-wrapper {
        width: 100%;
    }
    
    .gallery-image {
        width: 100% !important;
        height: auto !important;
        min-height: 200px;
        max-height: 400px;
        object-fit: contain !important;
        background: var(--bg-secondary);
        padding: 0.5rem;
        display: block;
    }
    
    .image-wrapper {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(168, 85, 247, 0.3);
    }
    
    .image-wrapper:active {
        transform: scale(0.98);
    }
    
    .video-container {
        padding: 1rem;
    }
    
    .video-card {
        padding: 1rem;
    }
    
    .video-wrapper {
        min-height: 250px !important;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .team-member {
        padding: 1.5rem;
    }
    
    .code-block {
        font-size: 0.8rem;
        padding: 1rem;
        overflow-x: auto;
    }
    
    .code-block pre {
        margin: 0;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 90vh;
        padding: 1rem;
        margin: 1rem;
    }
    
    .lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .lightbox-content img {
        max-height: 75vh;
        max-width: 100%;
        width: auto;
        height: auto;
    }
    
    .lightbox-caption {
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .project-main {
        padding: 2rem 0;
    }
    
    .skills-list {
        grid-template-columns: 1fr;
    }
    
    .skill-item {
        padding: 1rem;
    }
}
