/* Project Cards - Modern & Sleek Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
    max-width: 1400px;
    perspective: 1000px;
    /* Essential for 3D effect */
}

/* Project Card - Ice Block Style */
.project-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.1),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    height: 450px;
    width: 100%;
    transform-style: preserve-3d;
    /* Key for 3D tilt */
    will-change: transform;
}

/* Holographic Shine */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(115deg,
            transparent 0%,
            transparent 40%,
            rgba(255, 255, 255, 0.1) 45%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.1) 55%,
            transparent 60%,
            transparent 100%);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
    pointer-events: none;
    z-index: 10;
}

.project-card:hover::before {
    left: 100%;
    transition: left 0.7s ease;
}

.project-card:hover .project-image {
    /* Removed flex change to keep layout stable */
    transform: scale(1.02);
}

.project-card:hover .project-content {
    /* Removed flex change */
    background: rgba(15, 23, 42, 0.8);
}

/* Project Image */
.project-image {
    position: relative;
    width: 100%;
    height: 60%;
    overflow: hidden;
    transform-style: preserve-3d;
    z-index: 1;
}

.project-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Project Content */
.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    /* Force full width */
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.9));
    transform-style: preserve-3d;
    z-index: 2;
    box-sizing: border-box;
    /* Ensure padding doesn't affect width */
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    transform: translateZ(20px);
    /* Pop out */
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.project-description {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    transform: translateZ(10px);
}

/* Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    transform: translateZ(15px);
}

.tech-tag {
    background: rgba(99, 102, 241, 0.15);
    color: #c7d2fe;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    backdrop-filter: blur(4px);
}

/* Actions */
.project-actions {
    display: flex;
    gap: 0.5rem;
    transform: translateZ(25px);
}

.project-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.project-action-btn:hover {
    background: rgba(99, 102, 241, 0.6);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

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

    .project-card {
        height: auto;
        min-height: 400px;
    }
}

/* Small Projects Section */
.small-projects-section {
    padding: 2rem 0 6rem;
    position: relative;
}

.small-projects-header {
    margin-bottom: 3rem;
    padding-left: 1rem;
}

.small-projects-title {
    font-size: 1.5rem;
    color: #a5b4fc;
    font-family: 'Special Gothic Expanded One', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.small-projects-list {
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 0 auto;
}

.small-project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.small-project-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.small-project-item:hover {
    background: rgba(255, 255, 255, 0.03);
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.small-project-item:hover .small-project-name {
    color: #8b5cf6;
    transform: translateX(10px);
}

.small-project-item:hover .small-project-tech {
    opacity: 1;
    transform: translateX(-10px);
}

.small-project-info {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.small-project-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.small-project-tech {
    font-size: 0.9rem;
    color: #94a3b8;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.small-project-links {
    display: flex;
    gap: 1rem;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.small-project-item:hover .small-project-links {
    opacity: 1;
    transform: translateX(0);
}

.small-project-link {
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.small-project-link:hover {
    color: #8b5cf6;
    transform: scale(1.2);
}

/* Floating Preview */
.project-preview-float {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 180px;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: #0f172a;
}

.project-preview-float.active {
    opacity: 1;
    transform: scale(1);
}

.preview-video-wrapper {
    width: 100%;
    height: 100%;
}

.preview-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .small-project-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem 1rem;
    }

    .small-project-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .small-project-links {
        opacity: 1;
        transform: none;
        margin-top: 0.5rem;
    }

    .project-preview-float {
        display: none;
        /* Hide on mobile */
    }
}