/* ==================================
   re-section.css - Monthly Retrospective Section
   ================================== */

.re-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
}

/* Re Filter */
.re-filter-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.re-filter {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 5 3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.re-filter:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.re-card {
    min-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    scroll-snap-align: start;
}

.re-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-4px);
}

.re-month {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 8px;
}

.re-status {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.re-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 12px;
}

/* ---------------------------------
   Arc-style Modal (Peek Window)
   --------------------------------- */

.re-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.re-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.re-modal-window {
    background: var(--bg-card);
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.re-modal-overlay.show .re-modal-window {
    transform: scale(1) translateY(0);
}

.re-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.re-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.re-modal-content-area {
    padding: 60px 48px;
    overflow-y: auto;
    flex-grow: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.re-modal-content-area::-webkit-scrollbar {
    width: 6px;
}

.re-modal-content-area::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

/* Modal Internal Typography Styles */
.re-modal-month {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.re-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    line-height: 1.3;
}

.re-modal-body {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Markdown specific styles inside modal */
.re-modal-body h3 {
    margin-top: 40px;
    margin-bottom: 16px;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.re-modal-body p {
    margin-bottom: 24px;
}

.re-modal-body strong {
    color: var(--text-primary);
}

.re-modal-body ul {
    margin-left: 20px;
    margin-bottom: 24px;
}

.re-modal-body li {
    margin-bottom: 8px;
}

.re-modal-body del {
    color: var(--text-tertiary);
}

.re-modal-body .blockquote, .re-modal-body blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 16px;
    margin-left: 0;
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(var(--accent-rgb, 20, 200, 255), 0.05);
    padding: 16px;
    border-radius: 0 8px 8px 0;
}

/* Responsive constraints for modal */
@media (max-width: 768px) {
    .re-modal-window {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        border: none;
    }
    
    .re-modal-content-area {
        padding: 40px 24px;
    }

    .re-modal-close {
        top: 16px;
        right: 16px;
    }

    .re-modal-title {
        font-size: 1.5rem;
    }
}