@import url("global.css");

main {
    flex: 1 0 auto;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2dvh 4dvw 4rem;
    min-height: 80dvh;

    .intro-title {
        h1 {
            text-align: center;
            margin: 1.25rem 0 0.25rem;
            font-weight: var(--font-weight-bold, 700);
            animation: fadeInUp 0.6s ease-out both;
        }

        p {
            text-align: center;
            margin: 0 0 1.25rem;
            color: color-mix(in oklab, var(--text-color, #222) 80%, white);
            animation: fadeInUp 0.6s ease-out both 0.12s;
        }
    }
}

kanban-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;

    width: min(95vw, 1200px);
    margin: 0 auto;

    background: color-mix(in oklab, var(--body-background-color) 90%, #ffffff);
    padding: 1.25rem;
    
    border: 1px solid color-mix(in oklab, var(--text-color) 14%, #e5e9ef);
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    animation: fadeInUp 0.55s ease-out both;

    .col {
        background: color-mix(in oklab, var(--body-background-color) 94%, #ffffff);
        border: 1px solid color-mix(in oklab, var(--text-color) 16%, #e5e9ef);
        border-radius: 12px;
        padding: 0.75rem 0.75rem 1rem;
        box-shadow: 0 1px 0 rgba(0,0,0,0.04);
        animation: fadeInUp 0.55s ease-out both;

        &#done {
            background: color-mix(in oklab, var(--body-background-color) 40%, lightgreen);
        }

        &#reviewing {
            background: color-mix(in oklab, var(--body-background-color) 40%, orange);
        }

        &#in-progress {
            background: color-mix(in oklab, var(--body-background-color) 40%, yellow);
        }

        &#todo {
            background: color-mix(in oklab, var(--body-background-color) 40%, gray);
        }

        h2 {
            text-align: center;
            margin: 0.25rem 0 0.6rem;
            font-size: clamp(1.05rem, 1.2vw, 1.1rem);
            color: color-mix(in oklab, var(--text-color, #222) 85%, #667);
            font-weight: var(--font-weight-bold, 700);
        }

        ul {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;

            kanban-task {
                position: relative;
                background: color-mix(in oklab, var(--body-background-color) 90%, #ffffff);
                border: 1px solid color-mix(in oklab, var(--text-color) 18%, #e5e9ef);
                border-radius: 12px;
                padding: 0.9rem 1rem;
                box-shadow: 0 1px 0 rgba(0,0,0,0.08);
                display: flex;
                flex-direction: column;
                gap: 0.4rem;
                transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
                will-change: transform, box-shadow;

                &:hover {
                    transform: translateY(-3px);
                    border-color: color-mix(in oklab, var(--accent-color, #0077cc) 40%, #e5e9ef);
                    box-shadow: 0 10px 22px rgba(0,0,0,0.18);
                }

                h3 {
                    margin: 0;
                    font-size: 1rem;
                }

                p {
                    margin: 0;
                    color: color-mix(in oklab, var(--text-color, #222) 80%, #999);
                    font-size: 0.95rem;
                }
            }
        }

        &:nth-child(1) { animation-delay: .10s; }
        &:nth-child(2) { animation-delay: .20s; }
        &:nth-child(3) { animation-delay: .30s; }
        &:nth-child(4) { animation-delay: .40s; }
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktops */
@media (max-width: 1025px) { 
    kanban-grid { 
        grid-template-columns: repeat(3, minmax(0, 1fr)); 
    } 
}

/* Tablets/Laptops */
@media (min-width: 601px) and (max-width: 1024px) { 
    kanban-grid { 
        grid-template-columns: repeat(2, minmax(0, 1fr)); 
    } 
}

/* Mobile */
@media (max-width: 600px) { 
    kanban-grid { 
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
        padding: 0.75rem;

        .col {
            padding: 0.65rem 0.65rem 0.9rem;

            ul {
                gap: 0.65rem;
            }
        }
    }

    *, *::before, *::after {
        box-sizing: border-box;
    }
}