.projects {
    padding-top: 100px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-speed);
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    animation-fill-mode: forwards;
    position: relative;
    overflow: hidden;
}

.project-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.project-card:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-30px);
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }
.project-card:nth-child(7) { animation-delay: 0.7s; }
.project-card:nth-child(8) { animation-delay: 0.8s; }
.project-card:nth-child(9) { animation-delay: 0.9s; }
.project-card:nth-child(10) { animation-delay: 1.0s; }

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
    animation: fadeInUp 0.6s ease-out forwards;
}

.about-img {
    position: relative;
    display: inline-block; 
}

.about-img img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform var(--transition-speed);
    position: relative; 
    z-index: 1; 
}

.about-img:hover img {
    transform: scale(1.05);
}

.about-img::after {
    content: '';
    position: absolute;
    top: 20px; 
    left: 20px; 
    width: 100%; 
    height: 100%; 
    border-radius: 16px;
    z-index: 0; 
    opacity: 0.8;

    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
                var(--gradient) border-box;
    border: 4px solid transparent;
}

.about-me {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.contact-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-speed);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.contact-card:hover::before {
    transform: scaleX(1);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.contact-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-card a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-speed);
}

.contact-card a:hover {
    color: var(--accent-hover);
}

.model {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    overflow-y: auto;
}

.model-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.model-content {
    position: relative;
    background: var(--bg-primary);
    width: 100%;
    max-width: 60vw;
    max-height: 90vh;
    margin: 50px auto;
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s ease-out;
    overflow-y: auto;
    margin-bottom: 50px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-model {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
    z-index: 2001;
}

.close-model::before {
    content: '×';
    font-size: 2.5rem;
    line-height: 1;
}

.close-model:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.model-content::-webkit-scrollbar {
    width: 8px;
}

.model-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.model-content::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 4px;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .title-section {
        font-size: 2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .model-content {
        width: 95%;
        margin: 20px auto;
        padding: 2rem;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .project-card,
    .contact-card {
        padding: 1.5rem;
    }
}