/* Projects styles (moved out of style.css)
   Controls the visual panel and flexible grid for the "Арсенал & Проекты" section */

.projects-section {
    width: 900px; /* start at container width */
    max-width: 100%;
    margin: 28px auto;
    transition: width 420ms cubic-bezier(.2,.9,.2,1), transform 420ms ease, padding 420ms ease;
    will-change: width, transform, padding;

    /* visual panel */
    background: rgba(26,26,26,0.95);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    padding: 16px;
}
.projects-section h2 { margin-top: 0; margin-bottom: 18px; text-align: center; }

.projects-section.expanded {
    width: min(80vw, 1200px); /* expanded target */
    padding: 36px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* Ensure grid items align centrally and cards have consistent width */
.projects-grid { justify-items: center; }
.project-card { width: 100%; max-width: 320px; }

/* Make the grid flexible and adapt to available width */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

@media (max-width: 900px) {
    .projects-section { width: 100%; margin: 16px 10px; padding: 12px; }
    .projects-grid { grid-template-columns: 1fr; gap: 12px; }
    .project-card { padding: 8px; }
} 

@media (prefers-reduced-motion: reduce) {
    .projects-section { transition: none; }
}

/* Project card styles */
.project-card {
    position: relative;
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* cover image removed — use compact card with top-right icon */
.project-image {
    display: none;
}

.project-header {
    display:flex;
    align-items:center;
    gap:10px;
    margin-right: 92px; /* space for top-right icon */
}

.project-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width:72px;
    height:72px;
    border-radius: 12px;
    object-fit:cover;
    border:1px solid var(--border-color);
    flex-shrink:0;
}

.project-title { margin:0; font-size:18px; line-height:1.1 }

.project-techs {
    margin-top:4px;
    font-size:11px; /* немного меньше */
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:0.6px;
    color: #9aa;
}

.project-description {
    margin:10px 0 0 0;
    color: #d0d0d0;
    font-size:15px; /* чуть больше */
    font-weight:600; /* более жирный */
    line-height:1.3;
} 

.project-actions {
    display:flex;
    gap:8px;
    margin-top:10px;
    flex-wrap:wrap;
}

.project-action {
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 12px;
    background: var(--card-bg-color);
    border:1px solid var(--border-color);
    color:var(--text-color);
    text-decoration:none;
    border-radius:10px;
    font-weight:600;
}

.project-action.coming-soon,
.project-action[disabled] {
    opacity:0.6;
    cursor:default;
    pointer-events:none;
    filter:grayscale(20%);
}

@media (max-width: 600px) {
    .project-image { height: 140px; }
    .project-title { font-size:16px }
}