:root {
  --bg-color: #080808;
  --second-bg-color: #131313;
  --text-color: white;
  --main-color: #00ffee;
}

body {
    font-family: Arial, sans-serif;
    color: #fff;
    margin: 0;
    padding: 0;
    background-color: #333; 
}

.heading {
    font-size: 60px; 
    font-weight: bold;
    margin-bottom: 40px;
    font-family: 'Libre Baskerville', serif;
    text-align: center; 
}

.filter-buttons {
    text-align: center;
    margin-bottom: 30px;
}

.filter-btn {
    background: rgba(0, 255, 238, 0.1);
    border: 1px solid rgba(0, 255, 238, 0.3);
    padding: 12px 25px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: var(--main-color);
    font-size: 16px;
    margin: 10px;
    cursor: pointer;
    font-weight: 600;
    font-family: "Fira Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 255, 238, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 238, 0.5);
    background: rgba(0, 255, 238, 0.15);
    box-shadow: 0 6px 20px rgba(0, 255, 238, 0.2);
    color: #fff;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    opacity: 1;
}

.projects-section {
  text-align: center;
  background: transparent;
  margin-bottom: 50px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch;
}

.project-item {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.project-item:hover {
    transform: translateY(-5px);
}

.project-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    height: 650px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.project-card:hover {
    border-color: var(--main-color);
    box-shadow: 0 10px 30px rgba(0, 255, 238, 0.2);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
}

.project-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, var(--main-color), #7b2cbf);
    color: var(--bg-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: "Fira Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
}

.default-image {
    z-index: 1;
    opacity: 1;
}

.hover-image {
    z-index: 0;
    opacity: 0;
}

.project-item:hover .default-image {
    opacity: 0;
}

.project-item:hover .hover-image {
    opacity: 1;
}

.project-content {
    padding: 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 430px;
}

.project-title {
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-family: 'Libre Baskerville', serif;
    height: 2.8rem;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

.project-description {
    color: #ccc;
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    height: 120px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
    height: 80px;
    overflow: hidden;
    align-content: flex-start;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 255, 238, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    border: 1px solid rgba(0, 255, 238, 0.2);
    font-size: 1.3rem;
    color: var(--main-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(0, 255, 238, 0.2);
    transform: translateY(-2px);
}

.tech-item i {
    font-size: 1.6rem;
}

.project-actions {
    margin-top: auto;
    flex-shrink: 0;
}

.details-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(0, 255, 238, 0.1);
    color: var(--main-color);
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    font-family: "Fira Mono", monospace;
    border: 1px solid rgba(0, 255, 238, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    justify-content: center;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.details-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 255, 238, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.details-button:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 238, 0.5);
    background: rgba(0, 255, 238, 0.15);
    box-shadow: 0 6px 20px rgba(0, 255, 238, 0.2);
    color: #fff;
    text-decoration: none;
}

.details-button:hover::before {
    opacity: 1;
}

.hidden {
    display: none;
}

/* Media Queries */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        max-width: 1200px;
    }
    
    .project-item {
        max-width: 400px;
    }
    
    .project-card {
        height: 620px;
    }
    
    .project-content {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .projects-section {
        margin-bottom: 60px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .project-item {
        max-width: 100%;
    }
    
    .project-card {
        height: 550px;
    }
    
    .project-content {
        padding: 2rem;
        height: 330px;
    }
    
    .project-title {
        font-size: 1.8rem;
        height: 2.4rem;
    }
    
    .project-description {
        font-size: 1.3rem;
        height: 100px;
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }
    
    .tech-stack {
        height: 70px;
    }
    
    .tech-item {
        font-size: 1.1rem;
        padding: 0.6rem 1rem;
    }
    
    .details-button {
        font-size: 1.3rem;
        padding: 1rem 2rem;
    }
    
    .project-category {
        font-size: 1rem;
        padding: 6px 12px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 576px) {
    .projects-section {
        margin-bottom: 40px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-card {
        height: 500px;
    }
    
    .project-content {
        padding: 1.5rem;
        height: 320px;
    }
    
    .project-title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
        height: 2rem;
    }
    
    .project-description {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
        height: 90px;
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }
    
    .tech-stack {
        gap: 0.8rem;
        margin-bottom: 2rem;
        height: 60px;
    }
    
    .tech-item {
        font-size: 1rem;
        padding: 0.5rem 0.8rem;
    }
    
    .tech-item i {
        font-size: 1.3rem;
    }
    
    .project-category {
        font-size: 0.9rem;
        padding: 5px 10px;
    }
}

/* Special handling for single item in filtered view */
.projects-grid:has(.project-item:only-child) {
    justify-content: center;
}

.projects-grid:has(.project-item:only-child) .project-item {
    width: 380px;
    max-width: 380px;
}

@media (max-width: 768px) {
    .projects-grid:has(.project-item:only-child) .project-item {
        width: 100%;
        max-width: 100%;
    }
}
