@import url('style.css');

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.project-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.project-thumbnail {
    aspect-ratio: 1 / 1.414;
    border-bottom: 1px solid #eee;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f8f9fa;
}

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.project-card:hover .overlay,
.project-card:focus-within .overlay { opacity: 1; }

.btn-open {
    border-radius: 999px;
    background: #0073b1;
    color: #fff;
    padding: 11px 22px;
    text-decoration: none;
    font-weight: 700;
}

.project-info {
    padding: 16px;
    text-align: center;
}

.project-info h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.project-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.45;
}

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

.project-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    padding: 24px;
    background: rgba(0, 0, 0, 0.78);
    overflow: auto;
}

.project-modal.is-open { display: block; }

.project-modal-panel {
    position: relative;
    width: min(1180px, 100%);
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    padding: 24px;
}

.project-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #1e1e2d;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.project-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-right: 48px;
    margin-bottom: 12px;
}

.project-detail-description {
    color: #555;
    line-height: 1.6;
    white-space: pre-line;
    margin-bottom: 18px;
}

.project-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 18px;
}

.project-pdf-frame {
    width: 100%;
    height: 76vh;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
}

.project-video-wrap iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 8px;
    background: #111;
}

.is-hidden { display: none !important; }

@media (max-width: 820px) {
    .project-modal { padding: 12px; }
    .project-modal-panel { padding: 18px; }
    .project-detail-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .project-detail-grid { grid-template-columns: 1fr; }
    .project-pdf-frame { height: 68vh; }
}
