/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--border-color);
}

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

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

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.project-card h3 {
    font-size: 1.3rem;
    flex: 1;
}

.project-year {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

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

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    font-size: 0.85rem;
    background-color: var(--bg-color);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    color: var(--primary-color);
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.project-link:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
}

/* Project Detail Page */
.project-detail {
    padding: 3rem 0;
}

.project-detail-header {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.project-detail-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.project-year-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.project-detail-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.project-tech-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0;
}

.project-tech-detail span {
    background-color: var(--surface-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 500;
}

.project-skills-detail {
    margin: 2rem 0;
}

.project-skills-detail .skill-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-skills-detail .skill-list li {
    padding: 0.75rem 1rem;
    background-color: var(--surface-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 0.25rem;
    color: var(--text-primary);
}

.project-detail-content > div > h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.project-detail-content > div:first-of-type > h3 {
    margin-top: 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    gap: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.project-github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--surface-color);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.project-github-link:hover {
    background-color: var(--primary-color);
    color: var(--surface-color);
    transform: translateY(-2px);
}

.project-gallery {
    margin: 3rem 0;
}

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

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.02);
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-detail-header h1 {
        font-size: 1.75rem;
    }
}
