/* ----------------- projects ---------------- */

#projects {
    background: var(--background-secondary1);
    position: relative;
}
.projects-container {
    padding: 80px 10%;
}

.projects-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    margin-bottom: 64px;
}
.projects-header h1 {
    font-size: 32px;
    color: var(--text-primary-color);

    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.projects-header .separator {
    border: var(--accent-color) 1px solid;
    border-radius: 6px;
    height: 1px;
    width: 56px;

    margin: 16px 0;
}
.projects-header .sub-text {
    font-size: 16px;
    line-height: 1.8;
    font-weight: 200;
    text-align: center;

    color: var(--text-primary-color);
    max-width: 656px;
    margin: 0 auto;
}

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

.project-card {
    height: 100%;
    background: var(--background-primary);
    border-radius: 6px;
    
    display: flex;
    flex-direction: column;
    overflow: hidden;

    transition: scale 0.5s, box-shadow 0.25s;
}
.project-card:hover {
    scale: 1.025;
    box-shadow: rgba(0,0,0,0.25) 0 0 12px 2px;
}

.project-image-wrapper {
    position: relative;
    height: 240px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.project-image-placeholder {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.3);
}

.project-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card-content h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--text-primary-color);
}

.project-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary-color);
    margin-bottom: 24px;
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-meta .meta-separator {
    font-size: 4px;
    color: var(--text-secondary-color);

    display: flex;
    align-items: center;
    justify-content: center;
}

.project-category {
    color: var(--accent-color);
}

.project-description {
    color: var(--text-secondary-color);
    font-size: 14px;
    font-weight: 200;
    line-height: 1.6;
    margin-bottom: 16px;
    max-height: 100px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar for description */
.project-description::-webkit-scrollbar {
    width: 2px;
}

.project-description::-webkit-scrollbar-track {
    background: var(--background-primary);
    border-radius: 6px;
}

.project-description::-webkit-scrollbar-thumb {
    background: var(--background-secondary1);
    border-radius: 6px;
}

.project-description::-webkit-scrollbar-thumb:hover {
    background: var(--text-accent-color);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    max-height: 80px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar for tech stack */
.tech-stack::-webkit-scrollbar {
    width: 2px;
}

.tech-stack::-webkit-scrollbar-track {
    background: var(--background-primary);
    border-radius: 6px;
}

.tech-stack::-webkit-scrollbar-thumb {
    background: var(--background-secondary1);
    border-radius: 6px;
}

.tech-badge {
    background: var(--background-secondary1);
    color: var(--text-primary-color);
    padding: 8px;
    border-radius: 6px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tech-badge i {
    font-size: 12px;
}

.project-links {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.project-link {
    flex: 1;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 6px;

    text-decoration: none;
    text-align: center;
    font-size: 12px;
    font-weight: 500;

    background-color: var(--button-color);
    color: var(--background-primary);

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background-color 0.5s, scale 0.25s;
}
.project-link:hover {
    background-color: var(--accent-color);
    scale: 1.025;
}

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