/* Projects Section */
.project-container {
    margin: 1rem 0px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    flex-grow: 1;
}

.project-card {
    width: calc(33.333% - 1rem);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: var(--border-radius);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.project-card:hover {
    background-color: var(--background-hover);
}

.project-card:hover a,
.project-card:hover a > span {
    color: var(--secondary);
}

.project-card img {
    border-radius: var(--border-radius);
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.project-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.project-card h5 {
    letter-spacing: -2px;
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1;
    margin: 0;
}

.project-card span {
    color: var(--accent);
    font-size: 0.875rem;
}

.project-card p {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
}

.project-card a,
.project-card a > span {
    transition: all 0.2s ease-in-out;
    color: var(--accent);
    font-size: 0.875rem;
}

.project-card a > span {
    margin-left: 8px;
}

/* Featured Project Section */
.project-featured {
    width: 100%;
    padding: 1rem;
    margin: 1rem 0px;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
    border-radius: var(--border-radius);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.project-featured:hover {
    background-color: var(--background-hover);
}

.project-featured-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    padding: 0.5rem;
    background: var(--secondary);
    color: var(--background);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-featured-content h5 {
    letter-spacing: -2px;
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1;
    margin: 0;
}

.project-featured-content span {
    color: var(--accent);
    font-size: 0.875rem;
}

.project-featured-content p {
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
}

.project-featured-content a,
.project-featured-content a > span {
    transition: all 0.2s ease-in-out;
    color: var(--accent);
    font-size: 0.875rem;
}

.project-featured-content a > span {
    margin-left: 8px;
}

.project-featured-content:hover > a,
.project-featured-content:hover > a > span {
    color: var(--secondary);
}

.project-featured-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-featured-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--border-radius);
    object-fit: contain;
}

/* Project Modal Section */
.project-modal {
    background-color: var(--background);
    color: var(--text);
    border-radius: var(--border-radius);
    padding: 1rem;
    width: 100%;
    height: 100%;
    max-width: 1000px;
}

.project-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 1rem;
}

.project-modal-title-block {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-modal-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -1.5px;
    flex: 1;
}

.project-modal-title > span {
    margin-left: 16px;
    color: var(--accent);
}

.project-modal-close {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 40px;
    min-height: 40px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-modal-close:hover {
    background-color: var(--background-hover);
}

.project-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.project-modal-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-modal-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-modal-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.project-modal-section p {
    margin: 0;
    line-height: 1.6;
    color: silver;
}

.project-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project-modal-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-modal-link {
    height: fit-content;
    display: inline-flex;
    align-items: bottom;
    gap: 0.5rem;
    color: var(--secondary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-modal-link > span {
    line-height: 1.5;
}

/* Technology Grid */
.project-modal-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.project-modal-tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--background-hover);
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.project-modal-tech-item:hover {
    transform: translateY(-4px);
    background-color: rgba(255, 255, 255, 0.08);
}

.project-modal-tech-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.project-modal-tech-item span {
    font-size: 0.875rem;
    color: var(--secondary);
}

/* Lists */
.project-modal-list-item {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    line-height: 1.6;
    color: silver;
}

.project-modal-list-item::marker {
    color: var(--primary);
}

.project-modal-section > ul {
    padding-left: 0.75rem;
}

/* Right column - Images */
.project-modal-right {
    display: flex;
    align-items: top;
    justify-content: center;
}

.project-modal-images {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.project-modal-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* =============================================
   Projects Page Hero
   ============================================= */
.projects-hero {
    padding: 3rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeIn 0.6s ease-out both;
}

.projects-hero h1 {
    font-size: 5rem;
    font-weight: 300;
    letter-spacing: -4px;
    line-height: 1;
    margin: 0;
}

.projects-hero-desc {
    font-size: 1.05rem;
    color: silver;
    max-width: 480px;
    line-height: 1.6;
    margin: 0;
}

.projects-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.projects-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.projects-stat-number {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -1.5px;
    color: var(--secondary);
    line-height: 1;
}

.projects-stat-label {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.projects-stat-divider {
    width: 1px;
    height: 44px;
    background: var(--accent);
    opacity: 0.35;
}

/* =============================================
   Technology Filter Chips
   ============================================= */
.project-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 0.75rem;
}

.project-filter-chip {
    padding: 0.3rem 0.8rem;
    border-radius: 99px;
    font-size: 0.78rem;
    cursor: pointer;
    border: 1px solid var(--accent);
    color: var(--accent);
    transition: all 0.18s ease-in-out;
    user-select: none;
    line-height: 1.6;
}

.project-filter-chip:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.project-filter-chip.active {
    background: var(--secondary);
    color: var(--background);
    border-color: var(--secondary);
    font-weight: 600;
}

/* =============================================
   Project Count Label
   ============================================= */
.projects-count {
    display: block;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

/* =============================================
   Staggered card entrance animation (projects page only)
   ============================================= */
.projects-all-grid .project-card {
    animation: fadeIn 0.45s ease-out both;
    opacity: 0;
}

.projects-all-grid .project-card:nth-child(1)  { animation-delay: 0.04s; }
.projects-all-grid .project-card:nth-child(2)  { animation-delay: 0.09s; }
.projects-all-grid .project-card:nth-child(3)  { animation-delay: 0.14s; }
.projects-all-grid .project-card:nth-child(4)  { animation-delay: 0.19s; }
.projects-all-grid .project-card:nth-child(5)  { animation-delay: 0.24s; }
.projects-all-grid .project-card:nth-child(6)  { animation-delay: 0.29s; }
.projects-all-grid .project-card:nth-child(7)  { animation-delay: 0.34s; }
.projects-all-grid .project-card:nth-child(8)  { animation-delay: 0.39s; }
.projects-all-grid .project-card:nth-child(9)  { animation-delay: 0.44s; }
.projects-all-grid .project-card:nth-child(10) { animation-delay: 0.49s; }

/* Mobile Responsive */
@media (max-width: 1023px) {
    .projects-hero h1 {
        font-size: 3rem;
        letter-spacing: -2.5px;
    }

    .projects-stat-number {
        font-size: 1.5rem;
    }

    .project-filter-chip {
        font-size: 0.72rem;
        padding: 0.25rem 0.65rem;
    }

    .project-container {
        flex-direction: column;
        gap: 1rem;
    }

    .project-card {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
    }

    .project-card img {
        width: 120px;
        height: 120px;
        object-fit: cover;
        flex-shrink: 0;
        order: 2;
        margin-top: 0;
    }

    .project-card-content {
        flex: 1;
        order: 1;
        margin-top: 0;
        gap: 0.5rem;
    }

    .project-card h5 {
        font-size: 1.5rem;
        margin: 0;
    }

    .project-featured {
        flex-direction: row;
        gap: 1rem;
        align-items: center;
        padding: 1rem;
        margin: 1rem 0px;
    }

    .project-featured-content {
        flex: 1;
        gap: 0.5rem;
        order: 1;
    }

    .project-featured-content h5 {
        font-size: 1.5rem;
    }

    .project-featured-image {
        flex-shrink: 0;
        order: 2;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .project-featured-image img {
        width: 150px;
        height: 150px;
        max-width: none;
        max-height: none;
        object-fit: cover;
    }

    .featured-badge span {
        font-size: 0.65rem;
    }

    .project-modal {
        max-width: 100%;
        max-height: 95vh;
    }

    .project-modal-header {
        padding: 1rem;
    }

    .project-modal-title {
        font-size: 1.5rem;
    }

    .project-modal-title-block {
        flex-direction: column;
    }

    .project-modal-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
        max-height: calc(95vh - 100px);
    }

    .project-modal-tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.75rem;
    }

    .project-modal-tech-item {
        padding: 0.75rem;
    }

    .project-modal-tech-icon {
        width: 40px;
        height: 40px;
    }
}

